﻿<views:AboutView
    x:Class="SpaceNeedle.x6473.WindowsPhone.Views.About"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:views="clr-namespace:SpaceNeedle.x6473.WindowsPhone.Views"
    xmlns:controls="clr-namespace:SpaceNeedle.x6473.WindowsPhone.Controls"
    xmlns:viewmodels="clr-namespace:SpaceNeedle.x6473.WindowsPhone.ViewModels"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True" shell:SystemTray.Opacity="0">

    <d:Page.DataContext>
        <viewmodels:AboutViewModelSampleData />
    </d:Page.DataContext>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="{Binding AppContent.Name}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="{Binding StaticContent.AboutTitle}" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ScrollViewer Margin="0,0,0,0" >

                <StackPanel Orientation="Vertical">
                <Image Source="/Assets/microsoft-200.png" Width="200" VerticalAlignment="Top" Margin="0,20,0,0" Stretch="None" Grid.RowSpan="2"/>

                <!--TitlePanel contains the name of the application and page title-->
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.RowSpan="2" HorizontalAlignment="Center">
                    <Image Source="/Assets/Splash/6473-336.png" Width="130" VerticalAlignment="Center"/>
                        <Grid VerticalAlignment="Center">
                    <TextBlock Text="Cidadão" FontSize="48" Margin="0,-30,20,0" Foreground="White" FontWeight="Bold"/>
                    <TextBlock Text="Conectado" FontSize="24" Margin="20,30,0,0" Foreground="White" FontWeight="Light" HorizontalAlignment="Right"/>
                        </Grid>
                    </StackPanel>
                    <TextBlock  TextWrapping="Wrap" Text="{Binding StaticContent.AboutText}" VerticalAlignment="Top" HorizontalAlignment="Stretch" Margin="25,20,25,0"/>

                    <Button x:Name="saibamaisButton" Command="{Binding MoreInfoCommand}" Content="saiba mais" Margin="10,0,10,15" Grid.Row="1" Style="{StaticResource PivotTitleStyle}" HorizontalAlignment="Stretch" />

                    <TextBlock TextWrapping="Wrap" Margin="15,0,10,0" Height="32">
                    <Run Text="Versão: "></Run>
                    <Run x:Name="versionTextBlock"></Run>
                </TextBlock>
                    <Button Content="Verificar atualizações" Click="OnCheckUpdateButton_Click" Margin="10,0,10,15"/>

                    <Button Click="Button_Click" Content="limpar cache" Margin="10,0,10,15" Grid.Row="3" Style="{StaticResource PivotTitleStyle}"/>
                
            </StackPanel>
            </ScrollViewer>
        </Grid>


        <ProgressBar Visibility="{Binding IsInProgress, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource ProgressStyle}" VerticalAlignment="Top" />
        <controls:NewtworkStatusControl/>

    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar Mode="Default" Opacity="1.0" IsMenuEnabled="True" IsVisible="True">
            <shell:ApplicationBarIconButton IconUri="/Assets/AppBar/share.png" Text="share" Click="share_Click"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="uploadsMenuItem" Text="uploads" Click="OnUploadsMenuItem_Click"/>
                <shell:ApplicationBarMenuItem x:Name="signoutMenuItem" Text="sair" Click="OnSignOutMenuItem_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</views:AboutView>